package com.example.springcoudribbon.service.impl;

import com.example.springcoudribbon.service.ConsumerService;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

@Service
public class ConsumerServiceImpl implements ConsumerService {

    @Resource
    private RestTemplate restTemplate;

    @Override
    public String getRibbon() {
        return restTemplate.getForObject("http://eurekaclient/getProduct?name=aa",String.class);
    }
}
